onUnload="functionName()" Event handler for: window Occurs when a user exits a document.